package com.fqgj.sentry.manage.dao.impl;

import com.fqgj.common.base.AbstractBaseMapper;
import com.fqgj.sentry.manage.dao.McApplicationDao;
import com.fqgj.sentry.manage.entity.McApplicationEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * User: ykpbean
 * Date: 2017-07-12
 * Time: 14:21:02.908
 */

@Repository
public class McApplicationDaoImpl extends AbstractBaseMapper<McApplicationEntity> implements McApplicationDao {

    @Override
    public List<McApplicationEntity> selectListByMerchantId(Long merchantId) {
        return this.getSqlSession().selectList(this.getStatement(".selectListByMerchantId"), merchantId);
    }

    @Override
    public McApplicationEntity selectByMerchantIdAndAppCode(Long merchantId, String appCode) {
        Map map = new HashMap();
        map.put("merchantId", merchantId);
        map.put("appCode", appCode);
        return this.getSqlSession().selectOne(this.getStatement(".selectByMerchantIdAndAppCode"), map);
    }


}